from app.extension.database.sqlalchemy import sqla_db as db
from datetime import datetime
from .base_model import BaseModel


class ProductCategoryModel(db.Model, BaseModel):
    """订单模型"""

    __tablename__ = 'tb_product_category'
    id = db.Column(db.Integer, primary_key=True, comment='主键')
    product_id = db.Column(db.Integer, comment='商品id')
    category_id = db.Column(db.Integer, comment='类别id')

    def __init__(self, product_id, category_id):
        self.product_id = product_id
        self.category_id = category_id